<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<#include "../../common/header.html">
<script src="https://open.ys7.com/sdk/js/1.3/ezuikit.js"></script>
</head>
<body class="hold-transition skin-purple-light sidebar-mini">
	<div class="wrapper">

		<!-- 	顶部和左侧菜单的jsp s -->
		<#include "../../common/menu.html">
		<!-- 	顶部和左侧菜单的jsp e -->

		<!-- Content Wrapper. Contains page content -->
		<div class="content-wrapper" style="text-align: center;" id="videoDiv">
		
			<video  width="1300" height="803" id="myPlayer" poster="" controls playsInline webkit-playsinline autoplay >
				<source id="rtmpUrl" src="${Request.trafficDector.videoRtmpUrlHd!}" type="" />
				<source id="httpUrl" src="${Request.trafficDector.videoUrlHd!}"  type="application/x-mpegURL" />
			</video>
			<button onclick="change();">切换</button>
		
		</div>

	</div>
	<!-- ./wrapper -->
</body>
<script>

$(function() {
	var player = new EZUIPlayer('myPlayer');
	console.log(player);
});

function change() {
	
	var str = '<video  width="1300" height="803" id="myPlayer" poster="" controls playsInline webkit-playsinline autoplay >'
	        +    '<source id="rtmpUrl" src="rtmp://rtmp.open.ys7.com/openlive/b8ace4ec402e4b7a878502dc1ea18217" type="" />'
	        +    '<source id="httpUrl" src="http://hls.open.ys7.com/openlive/b8ace4ec402e4b7a878502dc1ea18217.m3u8"  type="application/x-mpegURL" />'
	        + '</video>';
	        
	$("#videoDiv").html(str);
	var player = new EZUIPlayer('myPlayer');
	
	//$("#rtmpUrl").attr("src","rtmp://rtmp.open.ys7.com/openlive/b8ace4ec402e4b7a878502dc1ea18217");
	//$("#httpUrl").attr("src","http://hls.open.ys7.com/openlive/b8ace4ec402e4b7a878502dc1ea18217.m3u8");
}


  
</script>
</html>